package com.xmy.cultivate.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xmy.cultivate.enums.StatusStaffEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 岗位调动
 * </p>
 *
 * @author hpiggy
 * @since 2024-02-02
 */
@TableName("staff_station_change")
@ApiModel(value = "StaffStationChange对象", description = "岗位调动")
@Data
public class StaffStationChange implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("员工id")
    private Long staffId;

    @TableField(exist = false)
    private String name;

    @ApiModelProperty("岗位id")
    private Long stationId;

    @ApiModelProperty("岗位名称")
    private String stationName;

    @ApiModelProperty("直属上级id")
    private Long superiorId;

    @ApiModelProperty("校区或者部门id")
    private Long organizationId;

    @ApiModelProperty("原岗位id")
    private Long oldStationId;

    @ApiModelProperty("原岗位名称")
    private String oldStationName;

    @ApiModelProperty("原直属上级id")
    private Long oldSuperiorId;

    @ApiModelProperty("原校区或者部门id")
    private Long oldOrganizationId;

    @ApiModelProperty("调动日期")
    private LocalDateTime changeDateTime;

    @TableField(exist = false)
    private LocalDate changeDate;

    @ApiModelProperty("员工类型")
    private Integer staffType;

    @ApiModelProperty("1调动，2离职")
    private Integer type;

    @TableField(exist = false)
    @ExcelIgnore
    private StatusStaffEnum status;

    private Integer causeId;

    private String causeContent;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT)
    private Long createdId;
}
